package cn.jiyun.service;

import cn.jiyun.mapper.UserMapper;
import cn.jiyun.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {
    @Autowired(required = false)
    private UserMapper userMapper;
    public List<User> findAll() {
        List<User>list=  userMapper.findAll();
        return list;
    }

    public Boolean deleteById(Integer id) {
        Boolean b= userMapper.deleteById(id);
        return b;
    }

    public Boolean updateById(Integer id) {
        Boolean b=userMapper.updateById(id);
        return b;
    }

    public void add(User user) {
        userMapper.add(user);
    }
}
